package my.code.service;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Component;

import com.bstek.bdf2.core.controller.IController;

@Component
public class Test implements IController {

	public String getUrl() {

		return "/demo";
	}

	public void execute(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		System.err.println("执行");
		PrintWriter out = response.getWriter();
		out.print("[{'CityId':18,'CityName':'西安','ProvinceId':27,'CityOrder':1},{'CityId':53,'CityName':'广州','ProvinceId':27,'CityOrder':1}]");
		out.flush();
		out.close();

	}

	public boolean anonymousAccess() {
		// TODO Auto-generated method stub
		return true;
	}

	public boolean isDisabled() {
		// TODO Auto-generated method stub
		return false;
	}

}
